<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数toString() 方法将函数作为一个字符串返回:</title>
</head>
<body>
<p>toString()将函数作为一个字符串返回：</p>
<p id="demo"></p>
<script>
    function myFunction() {
        return a*b;
    }
    document.getElementById("demo").innerHTML = myFunction.toString();
</script>
</body>
</html>